-- GENERATED SPELL FOR [Khan Hratha] --


function spell0_5402(pUnit, Event) --@Battle Shout,Self--
pUnit:FullCastSpellOnTarget(9128,pUnit)
pUnit:RegisterEvent('Sorts_5402', 635, 1)
end

function spell1_5402(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(15496,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5402', 692, 1)
end

function Sorts_5402(pUnit, Event)
local choix_sorts_5402 = math.random(0, 1)
if choix_sorts_5402 == 0 then
pUnit:RegisterEvent('spell0_5402', 1, 1)
end
if choix_sorts_5402 == 1 then
pUnit:RegisterEvent('spell1_5402', 1, 1)
end
end

function mob5402_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_5402', math.random(1500, 3000), 1)
end

function mob5402_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5402_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5402_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(5402, 1, 'mob5402_Action')
RegisterUnitEvent(5402, 2, 'mob5402_Leave')
RegisterUnitEvent(5402, 3, 'mob5402_Kill')
RegisterUnitEvent(5402, 4, 'mob5402_Die')
